<?php
global $pageTable;

$languageTmp    ="";
$contentFilename="/code/content/{$pageTable}_[php_property:field]_{$cmsData['id']}.php";

//echo $contentFilename;

 global $webEditUserGroup;

    if ($userData['_' . $usergroupTable] >= $cmsData['_' . $usergroupTable . '_edit'])
        {
        echo '<p class="edit_button"><a class="snapol_button" href="/admin/snapol-editor?table=' . $pageTable . '&id2=' . $cmsData['id2'] .'">
                Snapol Editor</a></p>';

        /*echo '<p class="edit_button"><a class="snapol_button" href="/snapol/edit?table=' . $pageTable . '&field=[php_property:field]' . $languageTmp . '&id=' . $cmsData['id'] . '&title=' . $cmsData['titel'] . '">
                Editieren</a></p>';   */     
        }


if (file::fileExists($contentFilename))
    {
    //global $rootDir;
    //include ($rootDir.$contentFilename);       //$languageTmp
    include ("../code/content/{$pageTable}_[php_property:field]_{$cmsData['id']}.php");
    
    }
else
    {
  //  echo $cmsData['text'];
  echo "Error: Kein Content File gefunden. File: $contentFilename";
    }

    global $webEditUserGroup;

    if ($userData['_' . $usergroupTable] >= $cmsData['_' . $usergroupTable . '_edit'])
        {
        echo '<p class="edit_button"><a class="snapol_button" href="/snapol/edit?table=' . $pageTable . '&field=[php_property:field]' . $languageTmp . '&id=' . $cmsData['id'] . '&title=' . $cmsData['titel'] . '">
                Editieren</a></p>';
              
                
        if ($webEditUserGroup>40) {
            echo '<p class="edit_button"><a class="snapol_button" href="/snapol/ajaxEdit?table=' . $pageTable . '&field=[php_property:field]' . $languageTmp . '&id2=' . $cmsData['id2'] . '&id=' . $cmsData['id'] . '&title=' . $cmsData['titel'] . '">
                    Editieren (Ajax)</a></p>';                
        }
}

                         //<img src="/snapol/button/edit.png" border="0" />
/*<div usergroup="30"><p><a class="snapol_button" href="/admin/page-edit?table=page&id2=<?php echo $cmsData['id2'];?>">Content Edit</a></p></div>*/
?>